import {
    createStore,
    applyMiddleware,
    combineReducers
} from "redux"

// 引入home模块
import {homeReducer} from "./modules/home"

 


// 引入中间件
import logger from "redux-logger"
// 做异步
import thunk from "redux-thunk"



// 使用redux-devtools 控制台显示数据
import {composeWithDevTools} from "redux-devtools-extension"
import {cateReducer} from "./modules/cate"
import {detailReducer} from "./modules/detail"
import {loginReducer} from "./modules/login"
import {registerReducer} from "./modules/register"
import {shopReducer} from "./modules/shop"
let reducer = combineReducers({
    home:homeReducer,
    cate:cateReducer,
    detail:detailReducer,
    login:loginReducer,
    register:registerReducer,
    shop:shopReducer
})

// 创建仓库
let store = createStore(reducer,composeWithDevTools(applyMiddleware(thunk,logger)))


// daochu 
export default store